<?php
class TransaccionesCsaldoModel extends Zwei_Db_Table
{
	protected $_name = "transacciones_csaldo";
    protected $_primary = array("id_trans", "fecha_tran");
	protected $_adapter = "dn";

// original: "SELECT msisdn, id_promo, modulo, usuario, estado, tipo_cliente, costo, fecha_tran $campoOrigen 
// FROM $tabla WHERE DATE(fecha_tran) >='".$this->fecha_ini."' AND DATE(fecha_tran) <='".$this->fecha_fin."'";  public function select()
    public function select()
    {
    	ini_set("memory_limit", "200M");
    	$this->setAdapter("dn");
        Debug::write($this->getAdapter()->getConfig());
        $select = new Zend_Db_Table_Select($this);
        $select->from($this->_name);
        
        
        return $select;
    }
    
    public function insert($data)
    {
        $this->setAdapter("an");
        return parent::insert($data);
    }
    
    public function update($data, $where)
    {
        $this->setAdapter("an");
        return parent::update($data, $where);
    }
    
    public function delete($where)
    {
        $this->setAdapter("an");
        return parent::delete($where);
    }

    public function __destruct() {
        ini_set("memory_limit", "128M");
    }    

}
